package com.admin;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ComponentScans;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.context.annotation.ImportResource;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@MapperScan(basePackages = {"com.admin.mapper"})
@EnableScheduling
@EnableAsync
@EnableAspectJAutoProxy(exposeProxy=true)
/**
 * 
 * @author yangzl
 *
 */
@ImportResource(locations = {"classpath:kaptcha.xml"})
public class VillageAdminApplication extends SpringBootServletInitializer {

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(VillageAdminApplication.class);
    }

    public static void main(String[] args) {
        SpringApplication.run(VillageAdminApplication.class, args);
    }
}